#include<stdio.h>

int main()
{
	int n;
	int arr[20][20];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		for(int j=0;j<i+1;j++){
			if(j==0||j==i){
				arr[i][j]=1;
				printf("%2d ",arr[i][j]);
			}
			else{
			    arr[i][j]=arr[i-1][j-1]+arr[i-1][j];
			    printf("%2d ",arr[i][j]);
			}
		}
		printf("\n");
	}
	//a[n][m]=a[n-1][m-1]+a[n-1][m]
	return 0;
 } 
